From: Jonas Dreßler Date: Sun, 12 May 2024 09:51:35 +0000 (+0200) Subject: overviewControls: Set expandFraction for ws thumbnails to 0 when hidden X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~165 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9bf550da8;p=gnome-shell.git overviewControls: Set expandFraction for ws thumbnails to 0 when hidden We multiply the spacing around the workspace thumbnails with the expandFraction so that it grows with the animation to show/hide them. We shouldn't factor in the extra spacing to accomodate for the thumbnails in case they're hidden though, so make sure expandFraction is set to 0 after the thumbnails got hidden. This fixes the spacing when a user never uses workspaces (and the workspace thumbnails are never shown), and also the first transition from hidden->shown for the thumbnails, which currently starts at 100% scale (ie. pops into existence). Part-of: --- diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 0fc81d85c..21084b110 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -561,7 +561,10 @@ class ControlsManager extends St.Widget { opacity: searchActive ? 0 : opacity, duration: animate ? SIDE_CONTROLS_ANIMATION_TIME : 0, mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => (this._thumbnailsBox.visible = thumbnailsBoxVisible), + onComplete: () => { + this._thumbnailsBox.visible = thumbnailsBoxVisible; + this._thumbnailsBox.expandFraction = 0; + }, }; if (!searchActive) {